package com.cmc.cloud.cmclink.doc.api.document.req.so;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.Date;

import static com.cmes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 特种货审批关联的船期信息 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 *
 * @author codegen
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SpecialCargoVoyageBaseApiVO {

    private Long id;

    @Schema(description = "特种货申请id", requiredMode = Schema.RequiredMode.REQUIRED, example = "19393")
    private Long applyId;

    @Schema(description = "航程序号")
    private Integer routeNo;

    @Schema(description = "航线代码")
    private String laneCode;

    @Schema(description = "船名", requiredMode = Schema.RequiredMode.REQUIRED)
    @Length(max = 50, message = "specialcargovoyage.vesselcode.length")
    private String vesselCode;

    @Schema(description = "航次", requiredMode = Schema.RequiredMode.REQUIRED)
    @Length(max = 50, message = "specialcargovoyage.voyageex.length")
    private String voyageEx;

    @Schema(description = "操船方", requiredMode = Schema.RequiredMode.REQUIRED)
    @Length(max = 20, message = "specialcargovoyage.carrier.length")
    private String carrier;

    @Schema(description = "装货港", requiredMode = Schema.RequiredMode.REQUIRED)
    @Length(max = 5, message = "specialcargovoyage.polcode.length")
    private String polCode;

    @Schema(description = "卸货港", requiredMode = Schema.RequiredMode.REQUIRED)
    @Length(max = 5, message = "specialcargovoyage.podcode.length")
    private String podCode;

    @Schema(description = "预计离港时间")
    @Length(max = 20, message = "specialcargovoyage.podcode.length")
    private String polEtd;

    @Schema(description = "进口航次")
    @Length(max = 50, message = "specialcargovoyage.voyageim.length")
    private String voyageIm;

    @Schema(description = "运输方式", requiredMode = Schema.RequiredMode.REQUIRED)
    @Length(max = 50, message = "specialcargovoyage.transmode.length")
    private String transmode;

    @Schema(description = "审批状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @Length(max = 50, message = "specialcargovoyage.routeapprovestatus.length")
    private String routeApproveStatus;

    @Schema(description = "审批人")
    @Length(max = 20, message = "specialcargovoyage.approver.length")
    private String approver;

    @Schema(description = "审批时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime approveTime;

    @Schema(description = "审批备注", example = "你猜")
    @Length(max = 1000, message = "specialcargovoyage.approveremark.length")
    private String approveRemark;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @Schema(description = "创建人")
    private String creator;

    @Schema(description = "操作时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @Schema(description = "操作人")
    private String updater;

}
